<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>静态属性</h1>
    <p>静态（static）属性，也称为类属性。只能通过类名去调用。</p>
    <p>非静态属性，也称为实例（对象）属性。只能通过实例去调用。</p>
    <div>

    </div>
    <script>
        class Human {

            static classis = "哺乳纲"

            constructor(name,age) {
                this.name = name;
                this.age = age;
            }

        }

        let yhz = new Human("袁浩哲",30);
        console.log(yhz.name);
        // 静态变量，只能通过类名调用
        console.log(Human.classis);

        console.log(yhz instanceof Human);
        console.log(yhz instanceof Object);


    </script>
</body>
</html>